#include<bits/stdc++.h>
using namespace std;
namespace IO
{
	template<typename T>
	void read(T &_x){_x=0;int _f=1;char ch=getchar();while(!isdigit(ch)) _f=(ch=='-'?-1:_f),ch=getchar();while(isdigit(ch)) _x=_x*10+(ch^48),ch=getchar();_x*=_f;}
	template<typename T,typename... Args>
	void read(T &_x,Args&...others){Read(_x);Read(others...);}
	const int BUF=20000000;char buf[BUF],to,stk[32];int plen;
	#define pc(x) buf[plen++]=x
	#define flush(); fwrite(buf,1,plen,stdout),plen=0;
	template<typename T>inline void print(T x){if(!x){pc(48);return;}if(x<0) x=-x,pc('-');for(;x;x/=10) stk[++to]=48+x%10;while(to) pc(stk[to--]);}
}
using namespace IO;
const int N = 2e5+10,Z = 1e6;
int n,q,a[N],x,f[N],sum[N],mx,S;
signed main()
{
	freopen("pockets.in","r",stdin);	
	freopen("pockets.out","w",stdout);
	read(n);
	for(int i = 1;i < n;i++) read(a[i]),S += a[i];
	read(q);
	while(q--)//nq 66
	{
		for(int i = 1;i <= n;i++) f[i] = 0;
		read(x),a[n] = x,mx = 0;
		if(x>S-a[1]){print((x+a[1])*2-(S+x)),pc('\n'); continue;}
		for(int i = n;i >= 1;i--) sum[i] = sum[i+1]+a[i];
		for(int i = n;i >= 3;i--) mx = max(mx,sum[i]-f[i+1]),f[i] = mx;
		for(int j = 3;j <= n;j++)
			f[1] = max(f[1],sum[j]-f[j+1]);
	//	for(int i = 3;i <= n;i++) cout<<f[i]<<" || ";
	//	cout<<endl;
		print((f[1]+a[1])*2-sum[1]),pc('\n');
	}
	flush();
	return 0;
}
/*
5
1 3 4 2
16
0
1
2
3
4
5
6
7
8
9 
10
11
12
13
14
15
*/
